#/usr/bin/perl
use strict;
use warnings;
use lib '/root/.cpan/build/Net-Twitter-3.17001-NYTlxk/lib/';
use Net::Twitter::Lite;
#use YAML::Tiny;
binmode(STDOUT, ":utf8");

#my $config = ( YAML::Tiny->read('config.yml') );
my $twit = Net::Twitter::Lite->new(
    traits              => [qw/api::rest oauth/],
    consumer_key        => 'rPbsMD2RBOEBjVmBz8pbKg',#$config->{'consumer_key'},
    consumer_secret     => 'MnfwIPnihjTkFNdf0WotUsCTiapwybvPGkB0w78Jg8',#$config->{'consumer_secret'},
    access_token        => '217277311-W7e80UAxyBTLF5kcSD0Ek2J5XHwTRyOMQTtJ3JTP',#$config->{'access_token'},
    access_token_secret => 'LjpLDZ1YtxCNXJ4N6KKybcnmwOzxktJjDhtup75ow',#$config->{'access_token_secret'}
   );
#$twit->update( 'madamadatuzuku' );
my $mentions = $twit->mentions();
my $screen_name_list = '';
for my $mentions_list ( @$mentions ){
    $screen_name_list = $mentions_list->{ id };
    my $save_list = $screen_name_list."\n";
    open( OUT,">>/var/www/html/test/data/reply_info.txt"); 
    print OUT $save_list;
    close(OUT);
    print $save_list;
}
print $screen_name_list;
